Repository navigation
fix: recover missing PR value context and explain failures - #21
Conversation
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://codex-gemini-context-recovery-github-flow-analytics.yuval-yeret.workers.dev (commit 603005a)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
There was a problem hiding this comment.
Tessl Reviewer
Advisory findings (3)
The context-recovery and diagnostic paths add bounded retries, structured diagnostics, and partial PR-result handling. The Worker transport still leaves timed-out provider work running, and two documented failure-result fields are absent on supported failure paths.
| Severity | Findings |
|---|---|
| Major | 1 |
| Minor | 2 |
Advisory findings (3)
- Major · Advisory · Non-blocking · Worker timeouts do not terminate the in-flight Gemini request
product_value.py:196 - Minor · Advisory · Non-blocking · The unconfigured product-value result lacks its documented stable error code
product_value.py:284 - Minor · Advisory · Non-blocking · Failed individual PR assessments lack the documented safe explanation
README.md:90
Reviews are incremental. The first review shows every valid finding. A later round checks the latest changes and earlier findings, and adds a fresh finding when it still applies. It never repeats one you refuted or declined. Ask for a full review to inspect the whole change and show earlier findings again.
Mention @tessl-reviewer to run another review.
There was a problem hiding this comment.
Tessl Reviewer
No advisory concerns
No findings to surface.
Earlier findings: 3 addressed
About this review
These findings are AI-generated and not authoritative. Check each one against the code before acting on it. See the guidance on working with this review.
Mention @tessl-reviewer to run another review.
Summary
PR value assessments can now recover when Gemini truncates the repository's product context. Remaining failures return a specific reason and an analysis ID that connects the API response to safe stage and PR diagnostics.
Context generation starts at 4,096 output tokens and retries once at 8,192 only on
MAX_TOKENS, within one 45-second deadline. The prompt requests a concise summary in its own words. Blocked responses, incomplete JSON, and provider errors never become scores. Successful PR assessments survive failures in other PRs. Worker fetches now receive an abort signal when either timeout cancels the request. Every supported failure result includes a stable error code and safe explanation.Logs record stage, model, attempt, HTTP status, finish reason, token usage, elapsed time, and PR identity where applicable. Credentials, prompts, source text, model output, raw URLs, headers, error bodies, and exception messages are excluded, including from the shared transport's error logs. Existing failed cached results expire within ten minutes;
force_refresh: truestarts a fresh analysis.Related: #20, #17. Jev cost-of-delay work in #19 remains separate.
Validation
POST /api/analyzeusing real GitHub and Gemini returned HTTP 200 in 23.39 seconds: 429 merged PRs, 92 active PRs, valid product context, and 22/30 PR assessments. The other eight received Gemini HTTP 429; logs identify their PR numbers and the shared analysis ID. This was not a deployed Workers run.RECITATIONresponse and a provider HTTP 503; both produced explicit safe diagnostics. Provider availability and quota can still prevent an assessment.